﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_passwd : System.Web.UI.Page
{
    public override string StyleSheetTheme
    {
        get
        {
            //return base.StyleSheetTheme;
            return ConfigGlobal.GetGlobal().Theme;
        }
        set
        {
            base.StyleSheetTheme = value;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ConfigGlobal.CheckLog();        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            ConfigGlobal.UpdatePassWord(this.TextBox2.Text);
            Helper.Alert("修改成功","AlertSuccess");
        }
    }
    protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
    {
        string oldpass = args.Value;
        args.IsValid = ConfigGlobal.IsOldPassRight(oldpass);
    }
}
